<!DOCTYPE html>
<html>
<head>
<title></title> <@h.head />
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
	<form action="${path}/productCategory/save" id="fm" method="post" enctype="multipart/form-data" class="definewidth m20">
		<input type="hidden" value="${(productCategory.id)!0}" name="id">
		<div style="text-align: center;" id="errorMsg">${msg!}</div>
		<table class="table table-bordered table-hover definewidth m10">
			<tr>
				<td width="10%" class="tableleft">产品类型<span class="required">*</span></td>
				<td><input type="text" name="name" value="${(productCategory.name)!}" datatype="*" nullmsg="请输入产品类型！"/></td>
			</tr>
			<tr>
				<td class="tableleft">描述 </td>
				<td><textarea rows="3" cols="*" name="content">${(productCategory.content)!}</textarea></td>
			</tr>
			<tr>
				<td class="tableleft">状态</td>
				<td><select name="disabled">
						<option value="0" <#if productCategory?? && (productCategory.disabled==0)> selected</#if>>启用</option>
						<option value="1" <#if productCategory?? && (productCategory.disabled==1)> selected</#if>>禁用</option>
				</select></td>
			</tr>
			<tr>
				<td class="tableleft">
					<#if (imgLogoPath)??>
						<a target="_blank" href="${imgLogoPath!}">产品类型logo</a>
						<input type="hidden" name="imgLogo" value="${(productCategory.imgLogo)!}"/>
					<#else>产品类型logo</#if>
					<#if !(productCategory)??><span class="required">*</span></#if></td>
				<td><input type="file" name="imgLogoFile" accept="image/jpeg,image/png" <#if !(productCategory)??>datatype="*"</#if> nullmsg="请选择产品logo！"/>
					<span class="tips">推荐85*80 png格式</span>
				</td>
			</tr>
			<tr>
				<td class="tableleft"></td>
				<td>
					<button type="submit" class="btn btn-primary" type="button">保存</button>
					&nbsp;&nbsp;
					<button type="button" class="btn btn-success" name="backid"
						id="backid">返回列表</button>
				</td>
			</tr>
		</table>
	</form>
	<@h.foot />
<script type="text/javascript">
	$(function() {
		$('#backid').click(function() {
			window.location.href = "${path}/productCategory/list";
		});
	});
	$("#fm").Validform({
		tiptype : 3,
		postonce : true
	});
</script>
</body>
</html>